﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<EnterpriseManagement.Models.RegisterModel>" %>

<div id="register">
<h1>注册</h1>
 
    <%: Html.ValidationSummary(true) %>
    <% using (Ajax.BeginForm(
    "Register", 
    new AjaxOptions { 
        HttpMethod = "POST",
        UpdateTargetId = "register" 
    }
    )) { %>

     <table id="tablenoframe" style =" margin:0 20%">
            <tr>
                <td class="label"><%: Html.LabelFor(model => model.EmployeeId) %></td>
                <td class="editor-field"><nobr>
                <%: Html.TextBoxFor(model => model.EmployeeId) %>*
                <%: Html.ValidationMessageFor(model => model.EmployeeId) %>
                </nobr>
                </td>
            </tr>

            <tr>
                <td class ="label"><%:Html.LabelFor (model=>model.Name) %></td>   
                <td class ="editor-label"><nobr>  <%:Html.TextBoxFor(model => model.Name)%>*
                <%:Html.ValidationMessageFor (model=>model.Name) %>  
                </nobr></td>    
            </tr>

            <tr>
                <td class="label"><%: Html.LabelFor(model => model.UserName) %></td>
                <td class="editor-field"><nobr>
                <%: Html.TextBoxFor(model => model.UserName) %>*
                <%: Html.ValidationMessageFor(model => model.UserName) %>
                </nobr></td>
            </tr>

            <tr>
                <td class="label"><%: Html.LabelFor(model => model.Password) %></td>
                <td class="editor-field"><nobr>
                <%: Html.PasswordFor(model => model.Password) %>*
                <%: Html.ValidationMessageFor(model => model.Password) %>
                </nobr></td>
            </tr>

            <tr>
                <td class="label"><%: Html.LabelFor(model => model.ConfirmPassword) %></td>
                <td class="editor-field"><nobr>
                <%: Html.PasswordFor(model => model.ConfirmPassword) %>*
                <%: Html.ValidationMessageFor(model => model.ConfirmPassword) %>
                </nobr></td>
            </tr>

            <tr>
                <td class="label"><%: Html.LabelFor(model => model.Birthday) %></td>
                <td class="editor-field"><nobr>
                <%: Html.TextBoxFor(model => model.Birthday) %>*
                <%: Html.ValidationMessageFor(model => model.Birthday) %>
                </nobr></td>
            </tr>

            <tr>
                <td class="label"><%: Html.LabelFor(model => model.Sex) %></td>
                <td class="editor-field"><nobr>
                <%: Html.DropDownList("Sex", (SelectList)ViewData["Sex"], new { style = "width:200px" })%>
                <%: Html.ValidationMessageFor(model => model.Sex) %>
                </nobr></td>
                <td style="text-align:left">"F"or"M"</td>
            </tr>

            <tr>
                <td class="label"><nobr><%: Html.LabelFor(model => model.Email) %></nobr></td>
                <td class="editor-field"><nobr>
                <%: Html.TextBoxFor(model => model.Email) %>
                <%: Html.ValidationMessageFor(model => model.Email) %>
                </nobr></td>
            </tr>

            <tr>
            <td class="label"><%: Html.LabelFor(model => model.GraduateSchool) %></td>
            <td class="editor-field"><nobr>
                <%: Html.TextBoxFor(model => model.GraduateSchool) %>
                <%: Html.ValidationMessageFor(model => model.GraduateSchool) %>
            </nobr></td>
            </tr>

            <tr>
                <td class="label"><%: Html.LabelFor(model => model.Major) %></td>
                <td class="editor-field"><nobr>
                <%: Html.TextBoxFor(model => model.Major) %>
                <%: Html.ValidationMessageFor(model => model.Major) %>
                </nobr></td>
            </tr>

            <tr>
                <td class="label"><%: Html.LabelFor(model => model.HiredDate) %></td>
                <td class="editor-field"><nobr>
                <%: Html.TextBoxFor(model => model.HiredDate) %>* 
                <%: Html.ValidationMessageFor(model => model.HiredDate) %>
                </nobr></td>
                <td style="text-align:left">example:19990312</td>
            </tr>

            <tr>
                <td class="label"><%: Html.LabelFor(model => model.Position) %></td>
                <td class="editor-field"><nobr>
               <%: Html.DropDownList("Position", (SelectList)ViewData["Position"], new { style = "width:200px" })%>
                </nobr><%: Html.ValidationMessageFor(model => model.Position) %>
            </td>
            </tr>

            <tr>
                <td class="label"><%: Html.LabelFor(model => model.Mobile) %></td>
                <td class="editor-field"><nobr>
                <%: Html.TextBoxFor(model => model.Mobile) %>*
                </nobr><%: Html.ValidationMessageFor(model => model.Mobile) %>
                </td>
            </tr>

            <tr>
                <td class="label"><%: Html.LabelFor(model => model.EmployeeStatus) %></td>
                <td class="editor-field"><nobr>
                 <%: Html.DropDownList("EmployeeStatus", (SelectList)ViewData["EmployeeStatus"], new { style = "width:200px" })%>
                <%: Html.ValidationMessageFor(model => model.EmployeeStatus) %>
                </nobr></td>
                
            </tr>

           <%-- <tr>
                <td class="label"><%: Html.LabelFor(model => model.LeaveDate) %></td>
                <td class="editor-field"><nobr>
                <%: Html.TextBoxFor(model => model.LeaveDate) %>
                <%: Html.ValidationMessageFor (model=>model.LeaveDate) %>
                </nobr></td>
            </tr>--%>
             <tr>
                <td></td><td><input type="submit" value="创建" style ="margin-left:80px;position:absolute" /></td>
              </tr>
           <%-- <tr><td colspan ="2" align ="center" ><input type="submit" value="创建" /></td></tr>--%>
            </table>

<% } %>

</div>